#ifndef __FLY_IBUS_H_
#define __FLY_IBUS_H_

#include "usart.h"
#include "main.h"

//通道
#define IBUS_UART							(&huart2)
#define IBUS_UART_INSTANCE		(USART2)
#define IBUS_USER_CHANNLES		10					//Use 6 channels
//帧字节
#define IBUS_LENGTH						0x20				//32 bytes
#define IBUS_COMMAND					0x40				//set servo/motor
#define IBUS_MAX_CHANNLES			14

void IBUS_Init(void);
void IBUS_Read_Channles(uint8_t user_channels);

#endif
